<?php
/* @var $this PersonalInformationController */
/* @var $model PersonalInformation */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'personal-information-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="column">
		<?php echo $form->labelEx($model,'Date & Time: '); ?>
		<?php $this->widget('ext.EJuiDateTimePicker',
                array(
        'model'     => $model,
        'attribute' => 'date_time',
        'language'=> 'en',//default Yii::app()->language
        'mode'    => 'datetime',//'datetime' or 'time' ('datetime' default)
        'options'   => array(
            'dateFormat' => 'yy.mm.dd',
			'timeFormat' => 'h:m:s',
			'changeMonth'=>true,
			'changeYear'=>true,
			'changeTime'=>true,
            //'timeFormat' => '',//'hh:mm tt' default
                        ),
                )); ?>
		<?php echo $form->error($model,'date_time'); ?>
	</div>
	<br>
	<br>
	<div class="column">
		<?php echo $form->labelEx($model,'First Name: '); ?>
		<?php echo $form->textField($model,'fname',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'fname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Last Name:'); ?>
		<?php echo $form->textField($model,'lname',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'lname'); ?>
	</div>

	<div class="column">
		<?php echo $form->labelEx($model,'Middle Initial:'); ?>
		<?php echo $form->textField($model,'mi',array('size'=>2,'maxlength'=>2)); ?>
		<?php echo $form->error($model,'mi'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Birth Date:'); ?>
		<?php $this->widget('ext.EJuiDateTimePicker',
                array(
        'model'     => $model,
        'attribute' => 'b_date',
        'language'=> 'en',//default Yii::app()->language
        'mode'    => 'date',//'datetime' or 'time' ('datetime' default)
        'options'   => array(
            'dateFormat' => 'yy.mm.dd',
			'changeMonth'=>true,
			'changeYear'=>true,
            //'timeFormat' => '',//'hh:mm tt' default
			),
                ));?>
		<?php echo $form->error($model,'b_date'); ?>
	</div>

	<div class="column">
		<?php echo $form->labelEx($model,'Age:'); ?>
		<?php echo $form->textField($model,'age'); ?>
		<?php echo $form->error($model,'age'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Gender: '); ?>
		<?php echo $form->textField($model,'gender',array('size'=>8,'maxlength'=>8)); ?>
		<?php echo $form->error($model,'gender'); ?>
	</div>

	<div class="column">
		<?php echo $form->labelEx($model,'Email Address:'); ?>
		<?php echo $form->textField($model,'email',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Address Number: '); ?>
		<?php echo $form->textField($model,'address_no'); ?>
		<?php echo $form->error($model,'address_no'); ?>
	</div>

	<div class="column">
		<?php echo $form->labelEx($model,'Street Address: '); ?>
		<?php echo $form->textField($model,'add_street',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'add_street'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'City Address: '); ?>
		<?php echo $form->textField($model,'add_city',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'add_city'); ?>
	</div>

	<div class="column">
		<?php echo $form->labelEx($model,'country'); ?>
		<?php echo $form->textField($model,'country',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'country'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'zip code'); ?>
		<?php echo $form->textField($model,'zip'); ?>
		<?php echo $form->error($model,'zip'); ?>
	</div>

	<div class="column">
		<?php echo $form->labelEx($model,'Home Phone Number: '); ?>
		<?php echo $form->textField($model,'home_tel'); ?>
		<?php echo $form->error($model,'home_tel'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Work Phone Number: '); ?>
		<?php echo $form->textField($model,'work_tel'); ?>
		<?php echo $form->error($model,'work_tel'); ?>
	</div>

	<div class="column">
		<?php echo $form->labelEx($model,'Cellphone Number: '); ?>
		<?php echo $form->textField($model,'cellno'); ?>
		<?php echo $form->error($model,'cellno'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'company'); ?>
		<?php echo $form->textField($model,'company',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'company'); ?>
	</div>

	<div class="column">
		<?php echo $form->labelEx($model,'work'); ?>
		<?php echo $form->textField($model,'work',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'work'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Health Insurance: '); ?>
		<?php echo $form->dropDownList($model,'heathinsurance_id', CHtml::listData(
                HealthInsurance::model() ->findAll(), 'id','name'), array('prompt' => 'Select Health Insurance')); 
                ?>
		<?php echo $form->error($model,'heathinsurance_id'); ?>
	</div>

	<div class="column">
		<?php echo $form->labelEx($model,'Inventory Id:'); ?>
		<?php echo $form->dropDownList($model,'inventory_id', CHtml::listData(
                Inventory::model() ->findAll(), 'id','id'), array('prompt' => 'Select Inventory')); 
                ?>
		<?php echo $form->error($model,'inventory_id'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->